package com.ape.dao;

import com.ape.pojo.Student;
import com.ape.pojo.query.StudentQuery;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper//告诉springboot这是一个mybatis类
@Repository//将StudentDao交由spring容器管理
public interface IStudentDao {

//    查询所有用户
    public List<Student> listStudent();

//    根据用户名来查询，并分页展示
    public List<Student> listStudentByName(StudentQuery studentQuery);

//    删除
    public int deleteStudentById(Integer Sid);

//    根据id查询用户
    public Student queryStudentById(Integer sid);

//    修改
    public int updateStudent(Student student);

//  根据name精准查询
    public List<Student> queryStudentByName(Student student);

//    新增用户
    public int addStudent(Student student);
}
